package com.share.common.rabbit.MqConfig;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.ReturnedMessage;
import org.springframework.amqp.rabbit.core.RabbitTemplate;


/**
 * 生成者到mq失败的回调
 */
@Slf4j
public class MsgSendReturnCallback implements RabbitTemplate.ReturnsCallback{
    @Override
    public void returnedMessage(ReturnedMessage returnedMessage) {
        log.info("回馈消息："+returnedMessage);
    }
}
